//
//  SNCustomCollectionView.swift
//  SNVIPER
//
//  Created by shaofeng on 2017/5/19.
//  Copyright © 2017年 shaofeng. All rights reserved.
//

import UIKit

class SNCustomCollectionView: UICollectionView {

    var reloadDataCompletion: (() -> ())?;
    
    func reloadData(complated:inout () -> ()) {
        reloadDataCompletion = complated;
        super.reloadData();
    }
    
    override func layoutSubviews() {
        super.layoutSubviews();
        
        if let completion = reloadDataCompletion {
            completion();
        }
    }
    
}
